package chenji.moreitemfunapi.command.help.helpPages;

import org.bukkit.entity.Player;

import chenji.moreitemfunapi.command.help.HelpLine;
import chenji.moreitemfunapi.command.help.HelpPage;
import chenji.moreitemfunapi.item.MifItem;
import chenji.moreitemfunapi.textures.info.TextureInfo;
import net.md_5.bungee.api.chat.ClickEvent.Action;

public class TextureHelpManager {
	private HelpPage mainPage;

	public TextureHelpManager() {
		mainPage = new HelpPage("MoreItemFun 材质管理器");
		mainPage.setClear(true);
		mainPage.addLine(new HelpLine("§c这里是材质包编辑快捷界面，你可以在这里进行一些快捷操作。"));
		mainPage.addLine(new HelpLine("  §c✎ §a查看所有的开启材质的物品", "/mif texture listall", "§c列出所有的开启材质的物品\n\n§c>>> §a点击查看"));
		mainPage.addLine(new HelpLine("  §c✎ §a查看所有未完全上传材质的物品", "/mif texture listall b", "§c列出所有未完全上传材质的物品\n\n§c>>> §a点击查看"));
		mainPage.addLine(new HelpLine("  §c✎ §a修改一个物品的材质", Action.SUGGEST_COMMAND, "/mif texture ct", "§c点击修改您的某个物品的材质信息\n§c请在补全指令后输入物品的识别名\n\n§c>>> §a点击自动补全指令"));
		mainPage.addLine(new HelpLine("  §c➠ §e制作材质包", "/mif texture makepack", "§c将材质做成材质包\n\n§c>>> §a点击制作"));
		mainPage.addLine(new HelpLine("  §c➠ §e接收材质包", "/mif texture receivepack", "§c接收制作好的材质包\n\n§c>>> §a点击接收"));
		mainPage.addLine(new HelpLine("  §c➠ §d返回主菜单", "/mif", "§c点击返回主菜单\n\n§c>>> §a点击返回"));
	}

	public void sendTextureHelpPage(Player p) {
		mainPage.send(p);
	}

	public void listAll(Player p, String string) {

	}

	private HelpLine getItemStateLine(TextureInfo info) {
		MifItem item = info.getMifItem();
		HelpLine line = new HelpLine("");
	}

	private HelpLine getTextureUpdate(String name, boolean isDone) {
		if (!isDone) {
			return new HelpLine("§c点击上传", "/mif texture ct " + name, "§c这个物品的材质似乎还未上传完整\n\n§c>>> §a点击继续上传您的材质");
		} else {
			return new HelpLine("§c点击修改", "/mif texture ct " + name, "§c这个物品的材质已上传完整\n\n§c>>> §a点击这里修改您的材质");
		}
	}
}
